//
//testalt.cpp 
//
//test program for "alt"
//

#include <iostream>
#include <vector>
#include <complex>
#include <assert.h>

#include <boost/operators.hpp>
#include "alt/algebraic.hpp"


template<typename EqType>
void show_and_solve(const EqType& eq)
{
    std::cout << "Eq:" << eq << std::endl;

    typename EqType::solution_container sol = 
        alt::get_solutions(eq);

	std::cout << "Sol:";
    typename EqType::solution_container::iterator it = sol.begin();
    for(;it!=sol.end();++it){
        std::cout << *it << ",";
    }
    std::cout << "\n";
}

int main(int argc, char* argv[])
{
    alt::variant x;

	show_and_solve(2*x + 3 == -5+x*6);
	show_and_solve((x-1)*(x+2));
    show_and_solve((x-4)*alt::pow<2>(x-8)==(x-8)*(x-4));

	return 0;
}
